package com.leetcode.offer.chapter4;

import com.leetcode.basic.TreeNode;

/**
 * @author Dennis Li
 * @date 2020/7/13 16:13
 */
public class MirrorTree_27 {

    public TreeNode mirrorTree(TreeNode root) {
        if(root == null) return null;
        TreeNode node = new TreeNode(root.val);
        node.left = mirrorTree(root.right);
        node.right = mirrorTree(root.left);
        return node;
    }
}
